//Wed May 11 19:58:39 CDT 2011
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>

using namespace std;

class SlimeXSlimesCity {
public:
	int merge(vector<int> population) {
		int N = population.size();
		long long sum = 0;
		for (int i = 0; i < N; i++) {
			v.push_back(make_pair(population[i], i));
			sum += population[i];
		}
		sort(v.begin(), v.end());
		int count = 0;
		for (int i = 0; i < N; i++) {
			int p;
			for (p = 0; p < N; p++) {
				if (v[p].second == i)
					break;
			}
			long long tmp = 0;
			for (int k = 0; k < N; k++) {
				if (tmp >= v[k].first || v[k].first <= v[p].first)
					tmp += v[k].first;
				else
					break;
			}
			if (tmp * 2 >= sum)
				count++;
		}
		return count;
	}
private:
	vector<pair<int, int> > v;
};

